package com.ruoyi.training.service.impl;

import java.util.List;

import com.ruoyi.training.dto.NoticeReceiveDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.training.mapper.NoticeReceiveMapper;
import com.ruoyi.training.domain.NoticeReceive;
import com.ruoyi.training.service.INoticeReceiveService;

/**
 * 通知接收Service业务层处理
 * 
 * @author lqx
 * @date 2025-10-24
 */
@Service
public class NoticeReceiveServiceImpl implements INoticeReceiveService 
{
    @Autowired
    private NoticeReceiveMapper noticeReceiveMapper;

    /**
     * 查询通知接收
     * 
     * @param noticeReceiveId 通知接收主键
     * @return 通知接收
     */
    @Override
    public NoticeReceive selectNoticeReceiveByNoticeReceiveId(String noticeReceiveId)
    {
        return noticeReceiveMapper.selectNoticeReceiveByNoticeReceiveId(noticeReceiveId);
    }

    /**
     * 查询通知接收列表
     * 
     * @param noticeReceive 通知接收
     * @return 通知接收
     */
    @Override
    public List<NoticeReceive> selectNoticeReceiveList(NoticeReceive noticeReceive)
    {
        return noticeReceiveMapper.selectNoticeReceiveList(noticeReceive);
    }

    /**
     * 新增通知接收
     * 
     * @param noticeReceive 通知接收
     * @return 结果
     */
    @Override
    public int insertNoticeReceive(NoticeReceive noticeReceive)
    {
        return noticeReceiveMapper.insertNoticeReceive(noticeReceive);
    }

    /**
     * 修改通知接收
     * 
     * @param noticeReceive 通知接收
     * @return 结果
     */
    @Override
    public int updateNoticeReceive(NoticeReceive noticeReceive)
    {
        return noticeReceiveMapper.updateNoticeReceive(noticeReceive);
    }

    /**
     * 批量删除通知接收
     * 
     * @param noticeReceiveIds 需要删除的通知接收主键
     * @return 结果
     */
    @Override
    public int deleteNoticeReceiveByNoticeReceiveIds(String[] noticeReceiveIds)
    {
        return noticeReceiveMapper.deleteNoticeReceiveByNoticeReceiveIds(noticeReceiveIds);
    }

    /**
     * 删除通知接收信息
     * 
     * @param noticeReceiveId 通知接收主键
     * @return 结果
     */
    @Override
    public int deleteNoticeReceiveByNoticeReceiveId(String noticeReceiveId)
    {
        return noticeReceiveMapper.deleteNoticeReceiveByNoticeReceiveId(noticeReceiveId);
    }

    /**
     * 批量新增
     * lqx
     * */
    @Override
    public int batchInsertnoticeReceive(List<NoticeReceive> noticeReceiveList) {
        return noticeReceiveMapper.batchInsertnoticeReceive(noticeReceiveList);
    }

    /**
     * 学员查询门户班级通知接收列表
     * lqx
     */
    @Override
    public List<NoticeReceiveDto> selectNoticeReceiveListByStudentIdAndClassId(NoticeReceive noticeReceive) {
        return noticeReceiveMapper.selectNoticeReceiveListByStudentIdAndClassId(noticeReceive);
    }
}
